
#ifndef __MLINK_LORA_HANDLE_H
#define __MLINK_LORA_HANDLE_H

#include <stdint.h>
#include <stdbool.h>

typedef struct {
	uint8_t en;
	uint16_t addr;
	uint8_t ch;
	uint8_t sp;
	uint8_t pwr;
} lora_config_t;

#define LORA_DEFAULT_CONFIG {.en = 0, .addr = 0,.ch = 23,.sp = 2,.pwr = 0 }

int lora_load_config( lora_config_t *config );
int lora_save_config( lora_config_t *config );

int mlink_lora_init(void);

#endif /* __MLINK_LORA_HANDLE_H */
